package org.itboys.seller.entity;

import java.util.List;

import org.itboys.seller.constant.SellerConstants;

import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Indexed;

/**
 * 商家登陆账号
 * @author weisky
 *
 */
@Entity(value = "SellerUser", noClassnameStored = true)
public class SellerUser extends BaseSellerEntity{
	
	private static final long serialVersionUID = -1468794516259173082L;
	
	@Indexed
	private long sellerId;//商家ID
	@Indexed
	private String userName;
	private String realName;
	private String companyName;
	private String idCard;
	private int totalAmount;// 该管理员手下的代理商总销售额
	private int recentTotalAmount; //该管理员手下的代理商当期总销售额
	private int rewardBalance;// 上期奖池余额
	@Indexed
	private String phone;
	private String password;
	private Integer state = SellerConstants.TYPE_ONE;//账号状态  0：冻结  1：开通
	private Long loginTime;//最后登入时间
	private String loginIp;//最后登入IP
	private String logo;//头像
	private Integer type = SellerConstants.TYPE_TWO;//级别  1：超级账户  2：普通账户
	
	/**
	 * 用户拥有的角色 每次分配重新set
	 */
	private List<Long> roleIds;
	private List<Long> menuIds;
	
	public long getSellerId() {
		return sellerId;
	}
	public void setSellerId(long sellerId) {
		this.sellerId = sellerId;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Integer getState() {
		return state;
	}
	public void setState(Integer state) {
		this.state = state;
	}
	public Long getLoginTime() {
		return loginTime;
	}
	public void setLoginTime(Long loginTime) {
		this.loginTime = loginTime;
	}
	public String getLoginIp() {
		return loginIp;
	}
	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}
	public String getLogo() {
		return logo;
	}
	public void setLogo(String logo) {
		this.logo = logo;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public List<Long> getRoleIds() {
		return roleIds;
	}
	public void setRoleIds(List<Long> roleIds) {
		this.roleIds = roleIds;
	}
	public List<Long> getMenuIds() {
		return menuIds;
	}
	public void setMenuIds(List<Long> menuIds) {
		this.menuIds = menuIds;
	}

	public int getTotalAmount() {
		return totalAmount;
	}

	public void setTotalAmount(int totalAmount) {
		this.totalAmount = totalAmount;
	}

	public int getRecentTotalAmount() {
		return recentTotalAmount;
	}

	public void setRecentTotalAmount(int recentTotalAmount) {
		this.recentTotalAmount = recentTotalAmount;
	}

	public int getRewardBalance() {
		return rewardBalance;
	}

	public void setRewardBalance(int rewardBalance) {
		this.rewardBalance = rewardBalance;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

}
